#ifndef __UTIL_FMT_H
#define __UTIL_FMT_H

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>

#ifdef __cplusplus
extern "C" {
#endif

/* --------------------------------------------------------------------- aton */
extern int util_atou64n(const char *str, uint8_t str_len, uint64_t *num);
extern int util_atoi64n(const char *str, uint8_t str_len, int64_t *num);
extern int util_atou32n(const char *str, uint8_t str_len, uint32_t *num);
extern int util_atoi32n(const char *str, uint8_t str_len, int32_t *num);
extern int util_atofn(const char *str, uint8_t str_len, double *num);

/* --------------------------------------------------------------------- ntoa */
extern int util_u64toa(uint64_t data, char *c);
extern int util_i64toa(int64_t data, char *c);

#ifdef __cplusplus
}
#endif
#endif
